




        var scaling = null;
        var scaleDelay = null;
        var prjctSwiper = new Swiper('.prjctSwiper',{
            centeredSlides:true,
            loop:true,
            slidesPerView:'auto',
            speed:800,
            on: {
                touchStart: function(event){
                    var evt = event || window.event;
                    console.log(evt.target);
                },
            },
        })


        $(document).ready(function(){
            setTimeout(function(){
                $('.projects').addClass('active');
            },10)

            

            $('.projects .contn .btn').click(function(){
                if($(this)[0].className.indexOf('prev') >= 0){
                    prjctSwiper.slidePrev(); 
                }else{
                    prjctSwiper.slideNext();
                }
            })
            $('.projects .contn .swiper').mouseenter(function(){
                $(this).addClass('on');
                secPrevent = false;
                console.log('c')
            })
            $('.projects .contn .swiper').mouseleave(function(){
                $(this).removeClass('on');
            })
            $('.projects .contn nav .choose ul li p').click(function(){
                var type = $(this).attr('data-categories');
                console.log(type);
                $('.projects .contn nav .choose ul li').removeClass('active');
                $(this).parent().addClass('active');
                $('.projects .contn .swiper').addClass('disappear');
                setTimeout(function(){
                    $('.projects .contn .swiper .swiper-slide').removeClass('hidden');
                    for(var c = 0;c < $('.projects .contn .swiper .name').length;c++){
                        var dataType = $('.projects .contn .swiper .name:eq(' + c + ')').attr('data-categories');
                        console.log(dataType)
                        if( dataType != type && type != 'all'){
                            $('.projects .contn .swiper .name:eq(' + c + ')').parents('.swiper-slide').addClass('hidden');
                        }else{
                            $('.projects .contn .swiper .name:eq(' + c + ')').parents('.swiper-slide').removeClass('hidden');
                        }
                    }
                    prjctSwiper.update();
                    $('.projects .contn .swiper').removeClass('disappear');
                },510)
            })
            $('.projects .swiper .swiper-slide').click(function(){
                if(scaleDelay) return false;
                $('.scale img').attr('src',$(this).find('img').attr('src'));
                $('.scale').css('top',$(this)[0].getBoundingClientRect().top + 'px');
                var scaleDelayScds = $(this)[0].className.indexOf('active') >= 0?10:810;
                scaleDelay = setTimeout(function(){
                    $('.scale').addClass('move');
                },scaleDelayScds)
                setTimeout(function(){
                    window.location.href = 'case.html';
                },1000 + scaleDelayScds);
                if($(this)[0].className.indexOf('prev') >= 0){
                    prjctSwiper.slidePrev();
                }else if($(this)[0].className.indexOf('next') >= 0){
                    prjctSwiper.slideNext();
                }
                console.log($(this)[0].getBoundingClientRect().top,$(this)[0].getBoundingClientRect().left);
                
                
            })
            $('.projects .contn .swiper .swiper-slide .box .pic').mouseup(function(){
                $(this).parents('.swiper-slide').addClass('msdn');
            })
            
            $('.projects.switch .swiper .swiper-slide').click(function(){
                if(scaleDelay) return false;
                $('.scale img').attr('src',$(this).find('img').attr('src'));
                $('.scale').css('top',$(this)[0].getBoundingClientRect().top + 'px');
                var scaleDelayScds = $(this)[0].className.indexOf('active') >= 0?10:810;
                scaleDelay = setTimeout(function(){
                    $('.scale').addClass('move');
                },scaleDelayScds)
                setTimeout(function(){
                    window.location.href = 'case.html';
                },1000 + scaleDelayScds);
                if($(this)[0].className.indexOf('prev') >= 0){
                    prjctSwiper.slidePrev();
                }else if($(this)[0].className.indexOf('next') >= 0){
                    prjctSwiper.slideNext();
                }
                console.log($(this)[0].getBoundingClientRect().top,$(this)[0].getBoundingClientRect().left);
                
                
            })
        })